package com.example.mapping.vo;

import com.google.common.collect.Lists;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 流程模型Vo类
 *
 * @author baoyoujia
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class FlowModelVo extends BaseVo{

    /**
     * 请求url
     */
    private String url;

    /**
     * 流程名称
     */
    private String flowName;

    /**
     * 流程描述
     */
    private String flowDescription;

    /**
     * 映射表达式
     */
    private String mappingExpression;

    /**
     * 字段映射
     */
    private List<FieldMappingVo> fieldMappings = Lists.newArrayList();

    /**
     * 添加字段映射Vo
     * @param fieldMappingVo 字段映射Vo
     */
    public void addFieldMappingVo(FieldMappingVo fieldMappingVo) {
        fieldMappings.add(fieldMappingVo);
    }
}
